body {
    display: flex;
    height: 100vh;
    justify-content: center;
    align-items: center;
  }
  .box {
      width: 200px;
      height: 200px;
      background-color: green;
  }
  /* 定位布局实现水平垂直居中 */
  /* .box {
      position: absolute;
      width: 200px;
      height: 200px;
      top: 50%;
      background-color: green;
      transform: translateY(-25%);
  } */